import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/login.vue'
import Register from '../views/register.vue'
import Personal from '../views/personal.vue'
import Editinfo from '../views/editinfo.vue'
import Index from '../views/index.vue'
import Detail from '../views/Detail.vue'
import Focus from '../views/focus.vue'


Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        // 登录页
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        // 注册页
        path: '/register',
        name: 'register',
        component: Register
    },
    {
        // 个人中心页
        path: '/personal',
        name: 'personal',
        component: Personal
    },
    {
        // 编辑资料页面
        path: '/editinfo',
        name: 'editinfo',
        component: Editinfo
    },
    {
        // 首页
        path: '/index',
        name: 'index',
        component: Index
    },
    { //详情页
        path: '/detail',
        name: 'detail',
        component: Detail
    },
    // 个人关注页
    {
        path: '/focus',
        name: 'focus',
        component: Focus
    }





]

const router = new VueRouter({
    routes
})

export default router